-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Enhancement](doris-future) Support "REGR_" aggregation functions (PART II) #41240
Conversation
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
be/src/vec/aggregate_functions/aggregate_function_regr_intercept.h
Outdated
Show resolved
Hide resolved
@Yoruet Null property of |
...re/src/main/java/org/apache/doris/nereids/trees/expressions/functions/agg/RegrIntercept.java
Outdated
Show resolved
Hide resolved
be/src/vec/aggregate_functions/aggregate_function_regr_intercept.cpp
Outdated
Show resolved
Hide resolved
be/src/vec/aggregate_functions/aggregate_function_regr_intercept.h
Outdated
Show resolved
Hide resolved
@Yoruet I add more comments with detail information. |
be/src/vec/aggregate_functions/aggregate_function_regr_intercept.cpp
Outdated
Show resolved
Hide resolved
...re/src/main/java/org/apache/doris/nereids/trees/expressions/functions/agg/RegrIntercept.java
Outdated
Show resolved
Hide resolved
be/src/vec/aggregate_functions/aggregate_function_regr_intercept.h
Outdated
Show resolved
Hide resolved
be/src/vec/aggregate_functions/aggregate_function_regr_intercept.h
Outdated
Show resolved
Hide resolved
be/src/vec/aggregate_functions/aggregate_function_regr_intercept.h
Outdated
Show resolved
Hide resolved
be/src/vec/aggregate_functions/aggregate_function_regr_intercept.h
Outdated
Show resolved
Hide resolved
be/src/vec/aggregate_functions/aggregate_function_regr_intercept.h
Outdated
Show resolved
Hide resolved
be/src/vec/aggregate_functions/aggregate_function_regr_intercept.h
Outdated
Show resolved
Hide resolved
@Yoruet I did some fix on regr_intercept on your branch, you can merge the pull request and do modification on other function. Test case should be taked. Reference https://dbfiddle.uk/MmKrIU9r |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Null value is not processed correctly.
Can you provide corresponding test samples to me |
@zhiqiang-hhhh I compared the data in the test_regr_intercept.out file with that in https://dbfiddle.uk/MmKrIU9r, and it seems that there is nothing wrong. Can you provide more detailed information? |
The reason test_regr_intercept is correct is that I re-write the implementation of regr_itercept in that PR (I created that pull request on your branch to give you an example on how to fix regr_itercept). You can compare the code I submitted with your implementation of regr_itercept, and do fix on regr_slope in a same way. |
PR approved by anyone and no changes requested. |
We need todo a refactor on all |
Does it include only regr_slope and regr_intercept or does it include other regr_ functions such as regr_sxx |
This is just a comment to remind us to do a refactor in the future, does not means we need to do refactor in this pr. |
@Yoruet please add doc in https://github.com/apache/doris-website thank you very mush |
I have already pr the doc.plz check it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR approved by at least one committer and no changes requested. |
run buildall |
TeamCity be ut coverage result: |
…RT II) (apache#41240) ## Proposed changes Issue Number: close apache#38975 <!--Describe your changes.--> ```sql mysql> select * from test; +------+------+------+ | id | x | y | +------+------+------+ | 1 | 18 | 13 | | 3 | 12 | 2 | | 5 | 10 | 20 | | 2 | 14 | 27 | | 4 | 5 | 6 | +------+------+------+ 5 rows in set (0.07 sec) mysql> select regr_slope(y,x) , regr_intercept(y,x) from test; +--------------------+----------------------+ | regr_slope(y, x) | regr_intercept(y, x) | +--------------------+----------------------+ | 0.6853448275862069 | 5.512931034482759 | +--------------------+----------------------+ 1 row in set (0.15 sec) ``` --------- Co-authored-by: zhiqiang-hhhh <seuhezhiqiang@163.com>
…RT II) (apache#41240) ## Proposed changes Issue Number: close apache#38975 <!--Describe your changes.--> ```sql mysql> select * from test; +------+------+------+ | id | x | y | +------+------+------+ | 1 | 18 | 13 | | 3 | 12 | 2 | | 5 | 10 | 20 | | 2 | 14 | 27 | | 4 | 5 | 6 | +------+------+------+ 5 rows in set (0.07 sec) mysql> select regr_slope(y,x) , regr_intercept(y,x) from test; +--------------------+----------------------+ | regr_slope(y, x) | regr_intercept(y, x) | +--------------------+----------------------+ | 0.6853448275862069 | 5.512931034482759 | +--------------------+----------------------+ 1 row in set (0.15 sec) ``` --------- Co-authored-by: zhiqiang-hhhh <seuhezhiqiang@163.com>
…RT II) (apache#41240) ## Proposed changes Issue Number: close apache#38975 <!--Describe your changes.--> ```sql mysql> select * from test; +------+------+------+ | id | x | y | +------+------+------+ | 1 | 18 | 13 | | 3 | 12 | 2 | | 5 | 10 | 20 | | 2 | 14 | 27 | | 4 | 5 | 6 | +------+------+------+ 5 rows in set (0.07 sec) mysql> select regr_slope(y,x) , regr_intercept(y,x) from test; +--------------------+----------------------+ | regr_slope(y, x) | regr_intercept(y, x) | +--------------------+----------------------+ | 0.6853448275862069 | 5.512931034482759 | +--------------------+----------------------+ 1 row in set (0.15 sec) ``` --------- Co-authored-by: zhiqiang-hhhh <seuhezhiqiang@163.com>
Proposed changes
Issue Number: close #38975